/**
 * jims
 */
package com.jims.master.modules.base.order.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.jims.master.common.persistence.DataEntity;
import com.jims.master.modules.base.user.entity.MasterBaseinfo;
import com.jims.master.modules.base.user.entity.MasterDoctorinfo;
import com.jims.master.modules.sys.entity.UserAddress;
import org.hibernate.validator.constraints.Length;

import java.util.Date;

/**
 * 订单信息Entity
 * @author qlx
 * @version 2017-05-02
 */
public class Sorders extends DataEntity<Sorders> {
	
	private static final long serialVersionUID = 1L;
	private String personId;		// 付款人id
    private String doctorId;		// 收款人id
	private String serviceId;
	private String defaultId;    //系统服务ID
	private String planId;		// 医生日程ID
	private String orderNo;		// 订单号
	private String buyEmail;		// 买家账号
	private String alipyNo;		// 微信、支付宝交易号
	private String alipyStyle;		// 支付类型(微信支付0、 支付宝支付1、银联卡支付2)',
	private Date orderDate;		// 订单日期
    private String orderDateStr;
	private String orderState;		// 订单状态
	private Date paymentTime;		// 付款时间
    private String paymentTimeStr;
	private Date refundTime;		// 退款时间
    private String refundTimeStr;
	private String title;		// 标题
	private Double price;		// 原价格
	private String discount;		// 折扣
	private Double cost;		// 实际价格
	private String orderContent;		// 服务内容
	private String picUrl;		// 图片
	private String depict;		// 情况描述
	private String serveType;		// 服务方式
	private String timeType;		// 服务时间
	private Date startTime;		// 服务时间
	private Date endTime;		// 服务时间
    private String persionAddress; //患者接受服务地址
    private String hospital;  //医院地址
    private String doctorName; //医生姓名
    private String titles; //医师职称
    private String doctorGoodAt; //擅长
	private UserAddress userAddress; //用户地址信息
	private MasterBaseinfo person;
	private MasterDoctorinfo masterDoctorinfo;    //医生信息

	public MasterDoctorinfo getMasterDoctorinfo() {
		return masterDoctorinfo;
	}

	public void setMasterDoctorinfo(MasterDoctorinfo masterDoctorinfo) {
		this.masterDoctorinfo = masterDoctorinfo;
	}

	public Sorders() {
		super();
	}


	public UserAddress getUserAddress() {
		return userAddress;
	}

	public void setUserAddress(UserAddress userAddress) {
		this.userAddress = userAddress;
	}

	public Sorders(String id){
		super(id);
	}
	public String getBuyEmail() {
		return buyEmail;
	}

	public void setBuyEmail(String buyEmail) {
		this.buyEmail = buyEmail;
	}

	public String getAlipyNo() {
		return alipyNo;
	}

	public void setAlipyNo(String alipyNo) {
		this.alipyNo = alipyNo;
	}

	public String getAlipyStyle() {
		return alipyStyle;
	}

	public void setAlipyStyle(String alipyStyle) {
		this.alipyStyle = alipyStyle;
	}

	public String getPersonId() {
		return personId;
	}

	public void setPersonId(String personId) {
		this.personId = personId;
	}

	@Length(min=0, max=64, message="收款人id长度必须介于 0 和 64 之间")
	public String getDoctorId() {
		return doctorId;
	}

	public void setDoctorId(String doctorId) {
		this.doctorId = doctorId;
	}
	
	@Length(min=0, max=200, message="订单号长度必须介于 0 和 200 之间")
	public String getOrderNo() {
		return orderNo;
	}

	public void setOrderNo(String orderNo) {
		this.orderNo = orderNo;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getOrderDate() {
		return orderDate;
	}

	public void setOrderDate(Date orderDate) {
		this.orderDate = orderDate;
	}
	
	@Length(min=0, max=2, message="订单状态长度必须介于 0 和 2 之间")
	public String getOrderState() {
		return orderState;
	}

	public void setOrderState(String orderState) {
		this.orderState = orderState;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getPaymentTime() {
		return paymentTime;
	}

	public void setPaymentTime(Date paymentTime) {
		this.paymentTime = paymentTime;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getRefundTime() {
		return refundTime;
	}

	public void setRefundTime(Date refundTime) {
		this.refundTime = refundTime;
	}
	
	@Length(min=0, max=200, message="标题长度必须介于 0 和 200 之间")
	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}
	
	public Double getPrice() {
		return price;
	}

	public void setPrice(Double price) {
		this.price = price;
	}
	
	public String getDiscount() {
		return discount;
	}

	public void setDiscount(String discount) {
		this.discount = discount;
	}
	
	public Double getCost() {
		return cost;
	}

	public void setCost(Double cost) {
		this.cost = cost;
	}
	
	public String getOrderContent() {
		return orderContent;
	}

	public void setOrderContent(String orderContent) {
		this.orderContent = orderContent;
	}
	
	@Length(min=0, max=600, message="图片长度必须介于 0 和 600 之间")
	public String getPicUrl() {
		return picUrl;
	}

	public void setPicUrl(String picUrl) {
		this.picUrl = picUrl;
	}
	
	@Length(min=0, max=500, message="服务详细地点长度必须介于 0 和 500 之间")
	public String getDepict() {
		return depict;
	}

	public void setDepict(String depict) {
		this.depict = depict;
	}
	
	@Length(min=0, max=1, message="服务方式长度必须介于 0 和 1 之间")
	public String getServeType() {
		return serveType;
	}

	public void setServeType(String serveType) {
		this.serveType = serveType;
	}
	
	@Length(min=0, max=20, message="服务时间长度必须介于 0 和 20 之间")
	public String getTimeType() {
		return timeType;
	}

	public void setTimeType(String timeType) {
		this.timeType = timeType;
	}

	public Date getStartTime() {
		return startTime;
	}

	public void setStartTime(Date startTime) {
		this.startTime = startTime;
	}

	public Date getEndTime() {
		return endTime;
	}

	public void setEndTime(Date endTime) {
		this.endTime = endTime;
	}

	public MasterBaseinfo getPerson() {
		return person;
	}

	public void setPerson(MasterBaseinfo person) {
		this.person = person;
	}

	public String getPlanId() {
		return planId;
	}

	public void setPlanId(String planId) {
		this.planId = planId;
	}

	public String getServiceId() {
		return serviceId;
	}

	public void setServiceId(String serviceId) {
		this.serviceId = serviceId;
	}

	public String getDefaultId() {
		return defaultId;
	}

	public void setDefaultId(String defaultId) {
		this.defaultId = defaultId;
	}

    public String getOrderDateStr() {
        return orderDateStr;
    }

    public void setOrderDateStr(String orderDateStr) {
        this.orderDateStr = orderDateStr;
    }

    public String getPaymentTimeStr() {
        return paymentTimeStr;
    }

    public void setPaymentTimeStr(String paymentTimeStr) {
        this.paymentTimeStr = paymentTimeStr;
    }

    public String getRefundTimeStr() {
        return refundTimeStr;
    }

    public void setRefundTimeStr(String refundTimeStr) {
        this.refundTimeStr = refundTimeStr;
    }

    public String getPersionAddress() {
        return persionAddress;
    }

    public void setPersionAddress(String persionAddress) {
        this.persionAddress = persionAddress;
    }

    public String getHospital() {
        return hospital;
    }

    public void setHospital(String hospital) {
        this.hospital = hospital;
    }

    public String getDoctorName() {
        return doctorName;
    }

    public void setDoctorName(String doctorName) {
        this.doctorName = doctorName;
    }

    public String getTitles() {
        return titles;
    }

    public void setTitles(String titles) {
        this.titles = titles;
    }

    public String getDoctorGoodAt() {
        return doctorGoodAt;
    }

    public void setDoctorGoodAt(String doctorGoodAt) {
        this.doctorGoodAt = doctorGoodAt;
    }
}